/*
 * fbank.com Inc.
 * Copyright (c) 2020 All Rights Reserved.
 * create by fm
 * date:2020-04-26
 *
 */
package com.ouwen.smartpay.service;


import com.fm.common.order.NotifyOrder;
import com.fm.core.common.service.EntityService;
import com.ouwen.smartpay.entity.NotifyMessage;
import com.ouwen.smartpay.entity.OrderInfo;

import java.util.List;

/**
 * 异步通知消息表 Service接口
 * <p>
 * Date: 2020-04-26 10:57:42
 *
 * @author fm
 */
public interface NotifyMessageService extends EntityService<NotifyMessage> {
    /***
     *
     * 通过商户号和商户订单号查询
     *
     * @author liyong
     * @date 11:01 2020-04-27
     * @param partnerId
     * @param subPartnerId
     * @param merchOrderNo
     * @exception
     * @return NotifyMessage
     **/
    NotifyMessage findByPartnerIdAndSubPartnerIdAndMerchOrderNo(String partnerId, String subPartnerId, String merchOrderNo);

    int updateProccessingStatus(Long id);

    List<NotifyMessage> listUnProcessed(int num);

    NotifyMessage saveNotifyMessageAndUpdateOrderInfo(NotifyOrder order, OrderInfo orderInfo) throws Exception;

}
